package cn.zyq.ykb.system.pay.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Description: 杉德支付配置文件
 * @Author pengdoudou
 * @Date 2022/8/7 14:54
 */

@Component
@ConfigurationProperties(prefix = "pay.sand")
public class PaySandProperties {
    /**
     * 商户ID
     */
    public static String mid;

    /**
     * 平台ID
     */
    public static String plMid;

    /**
     * 产品编码
     */
    public static String productId;

    /**
     * 杉德公钥
     */
    public static String publicKeyPath;

    /**
     * 商户号对应的私钥和密码
     */
    public static String privateKeyPath;

    /**
     * 私钥密码
     */
    public static String keyPassword;

    /**
     * 商户前台跳转地址：
     * 支付结束后跳转回商户平台的http/https路径
     */
    public static String frontUrl;

    /**
     * 杉德支付主动通知商户订单支付结果的https路径。
     * 通知地址必须为直接可以访问的URL。
     * 该地址需向杉德报备。异步通知地址报备方法
     */
    public static String payNotifyUrl;

    /**
     * 统一下单请求method
     */
    public static String orderCreateMethod;

    public void setMid(String mid) {
        PaySandProperties.mid = mid;
    }

    public void setPlMid(String plMid) {
        PaySandProperties.plMid = plMid;
    }

    public void setProductId(String productId) {
        PaySandProperties.productId = productId;
    }

    public void setPublicKeyPath(String publicKeyPath) {
        PaySandProperties.publicKeyPath = publicKeyPath;
    }

    public void setPrivateKeyPath(String privateKeyPath) {
        PaySandProperties.privateKeyPath = privateKeyPath;
    }

    public void setKeyPassword(String keyPassword) {
        PaySandProperties.keyPassword = keyPassword;
    }

    public void setFrontUrl(String frontUrl) {
        PaySandProperties.frontUrl = frontUrl;
    }

    public void setPayNotifyUrl(String payNotifyUrl) {
        PaySandProperties.payNotifyUrl = payNotifyUrl;
    }

    public void setOrderCreateMethod(String orderCreateMethod) {
        PaySandProperties.orderCreateMethod = orderCreateMethod;
    }
}
